// i.d(t, { b: () => AdaptiveRawShaderMaterial })
import * as THREE from "three"

export default class AdaptiveRawShaderMaterial extends THREE.RawShaderMaterial {
  onBeforeCompile(e, t) {
    super.onBeforeCompile(e, t)
    t.capabilities.isWebGL2 &&
      this.glslVersion !== THREE.GLSL3 &&
      ((e.glslVersion = THREE.GLSL3), (e.vertexShader = s + e.vertexShader), (e.fragmentShader = r + e.fragmentShader))
  }
}
const s = "\n#define attribute in\n#define varying out\n#define texture2D texture\n",
  r =
    "\n#define varying in\nout highp vec4 pc_fragColor;\n#define gl_FragColor pc_fragColor\n#define gl_FragDepthEXT gl_FragDepth\n#define texture2D texture\n#define textureCube texture\n#define texture2DProj textureProj\n"
